<template>
  <div class="container">
    <DataList
      ref="dataList"
      :propAutoFetchData="true"
      :propNoCheck="true"
      :propSearchFields="['materialName','materialSpec','lot']"
      :propSearchTextAppend="'名称/规格/批次'"
      propUrl="/settlement/stocks/pageCommon"
      showFieldPk="id"
      :isOnlyShow="true"
      :showFieldList="cpShowFieldList"
      :sortDefault="{field: 'materialName',type: 'asc'}"
    >
    </DataList>
  </div>
</template>

<script>

export default {
  help: '实时库存-列表',
  data() {
    return {
    }
  },
  computed: {
    cpShowFieldList() {
      let fieldList = [
        {label:'品名',name:'materialName',span:24, isTitle: true},
        {label:'规格',name:'materialSpec',span:24,isTitleSub: true},
        {label:'批次',name:'lot',span:12},
        {label:'数量',name:'qty',span:12,filterDisabled: true},
        {label:'单位',name:'unit',span:12,filterDisabled: true,sortDisabled: true},
        {label:'单价',name:'price',span:12,filterDisabled: true,sortDisabled: true},
        {label:'效期',name:'expiredDate',span:24,sortDisabled: true,queryType: this.constCommon.formItemType.datePickerBetween.name},
        { label: '厂商', name: 'manufacturerName', span: 24 },
      ]

      fieldList = [...fieldList, ...this.constCommon.filterCommon.spAndHp()]
      return fieldList
    }
  }
}
</script>
